home *** CD-ROM | disk | FTP | other *** search
- *** 1.27 1992/04/19 16:59:21
- --- Changelog 1992/06/03 18:41:47
- ***************
- *** 295,297 ****
- --- 295,305 ----
- write only the symbols since this is all what gdb needs
-
- ----------------------------- Patchlevel 27 ---------------------------------
- +
- + fixstk, printstk.c:: ++jrb
- + fix them up for word aligned machines. ie ifdef WORD_ALIGNED
- +
- + Makefile.cross, Makefile.hp:: ++jrb
- + add target for fixstk/printstk to the cross-makefiles.
- +
- + ----------------------------- Patchlevel 28 ---------------------------------
- *** 1.12 1991/07/23 22:43:21
- --- Makefile.cross 1992/06/03 18:41:47
- ***************
- *** 23,29 ****
- CFLAGS = -O -I. -I$(HOSTINC) -I$(CROSSINC) -DCROSSATARI=1 \
- -DCROSSDIR=\"$(CROSSDIR)\" -DCROSSLIB=\"$(CROSSLIB)\" -DWORD_ALIGNED=1
-
- ! ALL = ld sym-ld nm car size size68 tnm xstrip
-
- all: $(ALL)
- #
- --- 23,29 ----
- CFLAGS = -O -I. -I$(HOSTINC) -I$(CROSSINC) -DCROSSATARI=1 \
- -DCROSSDIR=\"$(CROSSDIR)\" -DCROSSLIB=\"$(CROSSLIB)\" -DWORD_ALIGNED=1
-
- ! ALL = ld sym-ld nm car size size68 tnm xstrip fixstk printstk
-
- all: $(ALL)
- #
- ***************
- *** 83,88 ****
- --- 83,89 ----
- cp tnm $(CROSSBIN)/tnm
- cp xstrip $(CROSSBIN)/xstrip
- cp sym-ld $(CROSSBIN)/sym-ld
- + cp fixstk printstk $(CROSSBIN)
-
- clean:
- rm -f *.o
- *** 1.3 1991/07/23 22:43:21
- --- Makefile.gcross 1992/06/03 18:41:47
- ***************
- *** 22,28 ****
- CFLAGS = -g -I. -I$(HOSTINC) -I$(CROSSINC) -DCROSSATARI=1 \
- -DCROSSDIR=\"$(CROSSDIR)\" -DCROSSLIB=\"$(CROSSLIB)\" -DWORD_ALIGNED=1
-
- ! ALL = ld sym-ld nm car size size68 tnm xstrip
-
- all: $(ALL)
- #
- --- 22,28 ----
- CFLAGS = -g -I. -I$(HOSTINC) -I$(CROSSINC) -DCROSSATARI=1 \
- -DCROSSDIR=\"$(CROSSDIR)\" -DCROSSLIB=\"$(CROSSLIB)\" -DWORD_ALIGNED=1
-
- ! ALL = ld sym-ld nm car size size68 tnm xstrip fixstk printstk
-
- all: $(ALL)
- #
- ***************
- *** 82,87 ****
- --- 82,88 ----
- cp tnm $(CROSSBIN)/tnm
- cp xstrip $(CROSSBIN)/xstrip
- cp sym-ld $(CROSSBIN)/sym-ld
- + cp fixstk printstk $(CROSSBIN)
-
- clean:
- rm -f *.o
- *** 1.2 1992/01/14 19:45:23
- --- Makefile.hp 1992/06/03 18:41:47
- ***************
- *** 29,35 ****
-
- LIBS = $(ALLOCA) $(MALLOC1)
-
- ! ALL = ld sym-ld nm car size size68 tnm xstrip
-
- all: $(ALL)
- #
- --- 29,35 ----
-
- LIBS = $(ALLOCA) $(MALLOC1)
-
- ! ALL = ld sym-ld nm car size size68 tnm xstrip fixstk printstk
-
- all: $(ALL)
- #
- ***************
- *** 89,94 ****
- --- 89,95 ----
- cp tnm $(CROSSBIN)/tnm
- cp xstrip $(CROSSBIN)/xstrip
- cp sym-ld $(CROSSBIN)/sym-ld
- + cp fixstk printstk $(CROSSBIN)
-
- clean:
- rm -f *.o
- *** 1.25 1992/04/19 16:59:21
- --- PatchLev.h 1992/06/03 18:41:48
- ***************
- *** 1,4 ****
- ! #define PatchLevel "27"
-
- /*
- * the Patch Level above is to identify the version
- --- 1,4 ----
- ! #define PatchLevel "28"
-
- /*
- * the Patch Level above is to identify the version
- *** 1.4 1991/04/12 18:22:25
- --- fixstk.c 1992/06/03 18:41:52
- ***************
- *** 15,26 ****
- */
-
- #include <stdio.h>
- #include <stdlib.h>
- ! #include <unixlib.h>
- #include <string.h>
- ! #include <st-out.h>
-
- - long lseek(int, long, int);
- static char *sym_names[] = { "__stksize", "__initial_stack" };
-
- long find_offset (fd, fn, what)
- --- 15,43 ----
- */
-
- #include <stdio.h>
- + #include <st-out.h>
- +
- + #if __STDC__
- #include <stdlib.h>
- ! #include <unistd.h>
- #include <string.h>
- ! #else
- ! #include <string.h>
- ! extern char *malloc();
- ! extern long lseek();
- ! #define size_t unsigned long
- ! #ifndef FILENAME_MAX
- ! # define FILENAME_MAX 128
- ! #endif
- ! #endif
- !
- ! #ifdef WORD_ALIGNED
- ! # define SIZEOF_AEXEC ((2*sizeof(short)) + (6*sizeof(long)))
- ! # define SIZEOF_ASYM ((SYMLEN*sizeof(char)) + sizeof(short) + sizeof(long))
- ! # define SYM_OFFSET (sizeof(short) + (3*sizeof(long)))
- ! #endif
- !
-
- static char *sym_names[] = { "__stksize", "__initial_stack" };
-
- long find_offset (fd, fn, what)
- ***************
- *** 34,40 ****
- --- 51,61 ----
- int all = 0;
- int index = 1;
-
- + #ifndef WORD_ALIGNED
- if(read(fd, &head, sizeof(head)) != sizeof(head))
- + #else
- + if(read_head(fd, &head))
- + #endif
- {
- perror(fn);
- exit(2);
- ***************
- *** 50,56 ****
- --- 71,81 ----
- exit(4);
- }
- if(lseek(fd, head.a_text+head.a_data, 1) !=
- + #ifndef WORD_ALIGNED
- (head.a_text+head.a_data+sizeof(head)))
- + #else
- + (head.a_text+head.a_data+SIZEOF_AEXEC))
- + #endif
- {
- perror(fn);
- exit(5);
- ***************
- *** 57,63 ****
- --- 82,92 ----
- }
- for(;;)
- {
- + #ifndef WORD_ALIGNED
- if(index && (read(fd, &sym, sizeof(sym)) != sizeof(sym)))
- + #else
- + if(index && read_sym(fd, &sym))
- + #endif
- {
- fprintf(stderr, "symbol _stksize not found\n");
- exit(6);
- ***************
- *** 77,83 ****
- --- 106,116 ----
- exit(9);
- }
- *what = index;
- + #ifndef WORD_ALIGNED
- return sym.a_value + sizeof(head);
- + #else
- + return sym.a_value + SIZEOF_AEXEC;
- + #endif
- }
-
- long calc_newsize(s)
- ***************
- *** 85,91 ****
- {
- size_t len = strlen(s) - 1;
- long mul = 1;
- ! long atol(const char *);
-
- switch(s[len])
- {
- --- 118,124 ----
- {
- size_t len = strlen(s) - 1;
- long mul = 1;
- ! long atol();
-
- switch(s[len])
- {
- ***************
- *** 160,162 ****
- --- 193,232 ----
- return close(fd);
- }
-
- + #ifdef WORD_ALIGNED
- + #ifndef atarist
- + # define lread read
- + # define lwrite write
- + #endif
- +
- + /*
- + * read header -- return !0 on err
- + */
- + #define ck_read(fd, addr, siz) \
- + if((long)siz != lread(fd, addr, (long)siz)) return !0;
- +
- + int read_head (fd, a)
- + int fd;
- + struct aexec *a;
- + {
- + ck_read(fd, &a->a_magic, sizeof(a->a_magic));
- + ck_read(fd, &a->a_text, sizeof(a->a_text));
- + ck_read(fd, &a->a_data, sizeof(a->a_data));
- + ck_read(fd, &a->a_bss, sizeof(a->a_bss));
- + ck_read(fd, &a->a_syms, sizeof(a->a_syms));
- + ck_read(fd, &a->a_AZero1, sizeof(a->a_AZero1));
- + ck_read(fd, &a->a_AZero2, sizeof(a->a_AZero2));
- + ck_read(fd, &a->a_isreloc, sizeof(a->a_isreloc));
- + return 0;
- + }
- +
- + int read_sym(fd, s)
- + int fd;
- + struct asym *s;
- + {
- + ck_read(fd, s->a_name, 8);
- + ck_read(fd, &(s->a_type), sizeof(short));
- + ck_read(fd, &(s->a_value), sizeof(long));
- + return 0;
- + }
- + #endif
- *** 1.32 1992/04/19 16:59:21
- --- ld.c 1992/06/03 18:41:53
- ***************
- *** 2306,2311 ****
- --- 2306,2314 ----
- sp->max_common_size = nlist_p->n_value;
-
- /* Are we defining it as a set element? */
- + #if 0
- + if (SET_ELEMENT_P (type)) /* potential fix but i dont see why ++jrb */
- + #endif
- if (SET_ELEMENT_P (type)
- && (!olddef || (olddef && sp->max_common_size)))
- set_vector_count++;
- *** 1.4 1991/04/12 18:22:25
- --- printstk.c 1992/06/03 18:41:54
- ***************
- *** 10,21 ****
- */
-
- #include <stdio.h>
- #include <stdlib.h>
- ! #include <unixlib.h>
- #include <string.h>
- ! #include <st-out.h>
-
- ! long lseek(int, long, int);
- static char *sym_names[] = { "__stksize", "__initial_stack" };
-
- long find_offset (fd, fn, what)
- --- 10,37 ----
- */
-
- #include <stdio.h>
- + #include <st-out.h>
- +
- + #if __STDC__
- #include <stdlib.h>
- ! #include <unistd.h>
- #include <string.h>
- ! #else
- ! #include <string.h>
- ! extern char *malloc();
- ! extern long lseek();
- ! #define size_t unsigned long
- ! #ifndef FILENAME_MAX
- ! # define FILENAME_MAX 128
- ! #endif
- ! #endif
-
- ! #ifdef WORD_ALIGNED
- ! # define SIZEOF_AEXEC ((2*sizeof(short)) + (6*sizeof(long)))
- ! # define SIZEOF_ASYM ((SYMLEN*sizeof(char)) + sizeof(short) + sizeof(long))
- ! # define SYM_OFFSET (sizeof(short) + (3*sizeof(long)))
- ! #endif
- !
- static char *sym_names[] = { "__stksize", "__initial_stack" };
-
- long find_offset (fd, fn, what)
- ***************
- *** 29,35 ****
- --- 45,55 ----
- int all = 0;
- int index = 1;
-
- + #ifndef WORD_ALIGNED
- if(read(fd, &head, sizeof(head)) != sizeof(head))
- + #else
- + if(read_head(fd, &head))
- + #endif
- {
- perror(fn);
- exit(2);
- ***************
- *** 45,51 ****
- --- 65,75 ----
- exit(4);
- }
- if(lseek(fd, head.a_text+head.a_data, 1) !=
- + #ifndef WORD_ALIGNED
- (head.a_text+head.a_data+sizeof(head)))
- + #else
- + (head.a_text+head.a_data+SIZEOF_AEXEC))
- + #endif
- {
- perror(fn);
- exit(5);
- ***************
- *** 52,58 ****
- --- 76,86 ----
- }
- for(;;)
- {
- + #ifndef WORD_ALIGNED
- if(index && (read(fd, &sym, sizeof(sym)) != sizeof(sym)))
- + #else
- + if(index && read_sym(fd, &sym))
- + #endif
- {
- fprintf(stderr, "symbol _stksize not found\n");
- exit(6);
- ***************
- *** 72,78 ****
- --- 100,110 ----
- exit(9);
- }
- *what = index;
- + #ifndef WORD_ALIGNED
- return sym.a_value + sizeof(head);
- + #else
- + return sym.a_value + SIZEOF_AEXEC;
- + #endif
- }
-
- int main(argc, argv)
- ***************
- *** 109,111 ****
- --- 141,180 ----
- return close(fd);
- }
-
- + #ifdef WORD_ALIGNED
- + #ifndef atarist
- + # define lread read
- + # define lwrite write
- + #endif
- +
- + /*
- + * read header -- return !0 on err
- + */
- + #define ck_read(fd, addr, siz) \
- + if((long)siz != lread(fd, addr, (long)siz)) return !0;
- +
- + int read_head (fd, a)
- + int fd;
- + struct aexec *a;
- + {
- + ck_read(fd, &a->a_magic, sizeof(a->a_magic));
- + ck_read(fd, &a->a_text, sizeof(a->a_text));
- + ck_read(fd, &a->a_data, sizeof(a->a_data));
- + ck_read(fd, &a->a_bss, sizeof(a->a_bss));
- + ck_read(fd, &a->a_syms, sizeof(a->a_syms));
- + ck_read(fd, &a->a_AZero1, sizeof(a->a_AZero1));
- + ck_read(fd, &a->a_AZero2, sizeof(a->a_AZero2));
- + ck_read(fd, &a->a_isreloc, sizeof(a->a_isreloc));
- + return 0;
- + }
- +
- + int read_sym(fd, s)
- + int fd;
- + struct asym *s;
- + {
- + ck_read(fd, s->a_name, 8);
- + ck_read(fd, &(s->a_type), sizeof(short));
- + ck_read(fd, &(s->a_value), sizeof(long));
- + return 0;
- + }
- + #endif
- *** 1.18 1992/04/19 16:59:21
- --- sym-ld.c 1992/06/03 18:41:56
- ***************
- *** 2055,2060 ****
- --- 2055,2063 ----
- sp->max_common_size = nlist_p->n_value;
-
- /* Are we defining it as a set element? */
- + #if 0
- + if (SET_ELEMENT_P (type)) /* potential fix but i dont see why ++jrb */
- + #endif
- if (SET_ELEMENT_P (type)
- && (!olddef || (olddef && sp->max_common_size)))
- set_vector_count++;
-